<script language="JavaScript">
$(document).ready(function() {
    $(".tabs .tab[id^=tab_menu]").hover(function() {
        var curMenu=$(this);
        $(".tabs .tab[id^=tab_menu]").removeClass("selected");
        curMenu.addClass("selected");
    });
    $(".tabs .tab[id^=tab_menu]").click(function() {
        var curMenu=$(this);
        $(".tabs .tab[id^=tab_menu]").removeClass("selected");
        curMenu.addClass("selected");
 
        var index=curMenu.attr("id").split("tab_menu_")[1];
        $(".curvedContainer .tabcontent").css("display","none");
        $(".curvedContainer #tab_content_"+index).css("display","block");

        $(function () {
            var offset = $("#share-box").offset();
            var shareboxheight = $("#share-box").height();
            var khoangcachshare = $("#curvedContainer").height() - shareboxheight - 30;
            var topPadding = 15;
            $(window).scroll(function () {
             if ($(window).scrollTop() > offset.top) {
                 if ($(window).scrollTop() < khoangcachshare + 566) {
                     $("#share-box").stop().css({
                         marginTop: $(window).scrollTop() - offset.top + topPadding
                     });
                 } else {
                     $("#share-box").stop().css({
                         marginTop: khoangcachshare - 15
                     });
                 }
             } else {
                 $("#share-box").stop().css({
                     marginTop: 15
                 });
             };
            });
        });

    });
    $(".tabs .tab[id=tab_menu_1]").click();
});
</script>
 <div class="tabscontainer">
     <div class="tabs" id="share-box" style="margin-top: 15px; ">
         <div class="tab first" id="tab_menu_1">
             <div class="link">Thông tin</div>
             <div class="arrow"></div>
         </div>
         <div class="tab" id="tab_menu_2">
             <div class="link">Vị trí</div>
             <div class="arrow"></div>
         </div>
          <div class="tab" id="tab_menu_3">
             <div class="link">Tiện ích</div>
             <div class="arrow"></div>
         </div>
         <div class="tab" id="tab_menu_4">
             <div class="link">Mặt bằng</div>
             <div class="arrow"></div>
         </div>
         <div class="tab" id="tab_menu_5">
             <div class="link">Tiến độ</div>
             <div class="arrow"></div>
         </div>
         <div class="tab selected" id="tab_menu_6">
             <div class="link">Tin tức </div>
             <div class="arrow"></div>
         </div>
         <div class="tab" id="tab_menu_7">
             <div class="link">Hình ảnh</div>
             <div class="arrow"></div>
         </div>
         <div class="tab" id="tab_menu_8">
             <div class="link">Video</div>
             <div class="arrow"></div>
         </div>
         <div class="tab last" id="tab_menu_9">
             <div class="link">Liên hệ</div>
             <div class="arrow"></div>
         </div>
          <?php if($this->bds == '1'){
            echo '<div class="tab last" id="">
                     <div class="link"><a href="index.php/bds-duan.html?id='.$this->project['id'].'">Cập nhật sản phẩm</a></div>
                     <div class="arrow"></div>
                 </div>';
         } ?>
    </div>
    <div class="curvedContainer" id="curvedContainer">
            <div class="tabcontent" id="tab_content_1" style="display: block; ">
                <?php echo $this->project['thongtin'];?>
            </div>
            <div class="tabcontent" id="tab_content_2" style="display: block; ">
                <?php echo $this->project['vitri'];?>
            </div>
            <div class="tabcontent" id="tab_content_3" style="display: block; ">
                <?php echo $this->project['dientich'];?>
            </div>
            <div class="tabcontent" id="tab_content_4" style="display: block; ">
                <?php echo $this->project['matbang'];?>
            </div>
            <div class="tabcontent" id="tab_content_5" style="display: block; ">
                <?php echo $this->project['tiendo'];?>
            </div>
            <div class="tabcontent" id="tab_content_6" style="display: block; ">
                <?php echo $this->project['tintuc'];?>
            </div>
            <div class="tabcontent" id="tab_content_7" style="display: block; ">
                <?php echo $this->project['hinhanh'];?>
            </div>
            <div class="tabcontent" id="tab_content_8" style="display: block; ">
                <?php echo $this->project['video'];?>
            </div>
            <div class="tabcontent" id="tab_content_9" style="display: block; ">
                <?php echo $this->project['lienhe'];?>
            </div>
    </div>
</div>